/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.employee.controller;

import com.admin.model.ContactMessageFacadeLocal;
import com.entities.ContactMessage;
import com.entities.Employee;
import javax.ejb.EJB;
import javax.ejb.Stateless;

/**
 *
 * @author VANANH
 */
@Stateless
public class ContactBean implements ContactBeanRemote
{
    @EJB
    private ContactMessageFacadeLocal contactMessageFacade;
    
    @Override
    public boolean send(String username, String message)
    {
        ContactMessage cm = new ContactMessage(1, message, Boolean.FALSE, new Employee(username));
        contactMessageFacade.create(cm);
        return true;
    }
}
